package CONTROLLERS;

import java.sql.Connection;
import java.sql.ResultSet;

import ENTITIESMODELS.UserEntitys;
import MODELS.UserModels;

public abstract class BaseControllers<T> {
    protected Connection m_objConnection = null;
    protected UserEntitys m_objSecurityContext = null;
    protected UserModels m_objUserModels = null;

    public BaseControllers(Connection objConnection, UserEntitys objSecurity) {
        m_objConnection = objConnection;
        m_objSecurityContext = objSecurity;
        m_objUserModels = new UserModels(objConnection, objSecurity);
    }

    public abstract ResultSet ExecOfGetElements() throws Exception;

    public abstract ResultSet ExecOfGetElementById(T obj) throws Exception;

    public abstract void ExecOfCheckElement(T obj) throws Exception;

    public abstract boolean ExecOfInsertElement(T obj) throws Exception;

    public abstract boolean ExecOfUpdateElement(T obj) throws Exception;

    public abstract boolean ExecOfDeleteElement(T obj) throws Exception;

    public abstract ResultSet ExecOfFindElement() throws Exception;
}
